package com.ces.knacky.controller.tools;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.ces.knacky.framework.controller.ListController;
import com.ces.knacky.model.Bid;
import com.ces.knacky.services.AuctionService;

@Controller
public class ListBidController extends ListController<Bid> {
	
	@Autowired
	private AuctionService auctionService;

	/**
	 * @return list of bids to approve
	 */
	@RequestMapping("/listBid.htm")
	public String execute(){		
		listEntity = auctionService.loadPlacedBid();		
		System.out.println("<><><><><><><> placed bids cnt ="+listEntity.size());
		return "listBid";
	}

	public AuctionService getAuctionService() {
		return auctionService;
	}

	public void setAuctionService(AuctionService auctionService) {
		this.auctionService = auctionService;
	}

}
